
SRCS= comm.c main.c formula_2plus.c 
OBJS= comm.o main.o formula_2plus.o formula_recursion.o formula_2power.o formula_autogen.o \
      formula_submult.o formula_2plusquare.o formula_alte.o formula_funnumb.o formula_xdhh.o \
      formula_sumsequen.o formula_square.o formula_2plushh.o formula_hunh.o  formula_sumdiff.o 
PROG= nGame
CCOPT= -g -c  
#CCOPT+= -D_DEBUG_

$(PROG):$(OBJS)
	  gcc -o $(PROG) $(OBJS)

comm.o: comm.c comm.h
	gcc $(CCOPT) comm.c

main.o: main.c comm.h conf.h 
	gcc $(CCOPT) main.c 

formula_2plus.o: formula_2plus.c comm.h 
	gcc $(CCOPT) formula_2plus.c 

formula_2power.o: formula_2power.c  comm.h
	gcc $(CCOPT) formula_2power.c

formula_recursion.o: formula_recursion.c comm.h
	gcc $(CCOPT) formula_recursion.c

formula_autogen.o: formula_autogen.c  comm.h
	gcc $(CCOPT) formula_autogen.c

formula_submult.o: formula_submult.c comm.h
	gcc $(CCOPT) formula_submult.c 
formula_2plusquare.o: formula_2plusquare.c comm.h
	gcc $(CCOPT) formula_2plusquare.c
formula_alte.o: formula_alte.c comm.h
	gcc $(CCOPT) formula_alte.c
formula_funnumb.o: formula_funnumb.c comm.h
	gcc $(CCOPT) formula_funnumb.c
formula_xdhh.o: formula_xdhh.c comm.h
	gcc $(CCOPT) formula_xdhh.c
formula_sumsequen.o : formula_sumsequen.c comm.h
	gcc $(CCOPT) formula_sumsequen.c
formula_square.o: formula_square.c comm.h
	gcc $(CCOPT) formula_square.c
formula_2plushh.o: formula_2plushh.c comm.h
	gcc $(CCOPT) formula_2plushh.c
formula_hunh.o: formula_hunh.c comm.h
	gcc $(CCOPT) formula_hunh.c
formula_sumdiff.o: formula_sumdiff.c comm.h
	gcc $(CCOPT) formula_sumdiff.c
clean:
	rm $(OBJS) $(PROG)

